package org.kgduyjj.toolkit.enumtype;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 通用的状态码对照
 * 
 * <pre>
 * CreateBy.2020/10/30 | UpdateBy.2020/11/02
 * </pre>
 * <ul>
 * <li>0000: [ 执行成功 ]Success</li>
 * <li>1111: [ 执行失败 ]Failure</li>
 * <li>5000: [ 内部未知异常 ]Internal Exception</li>
 * <li>5010: [ 接口或方法未实现 ]Not Implemented</li>
 * <li>5020: [ 参数缺失或不完整 ]Parameter Incomplete</li>
 * <li>5030: [ 非法操作 ]Illegal Operation</li>
 * <li>5031: [ 不支持操作 ]Unsupported Operation</li>
 * <li>5032: [ 非法请求对象 ]Illegal Request</li>
 * <li>5040: [ 非法认证 ]Illegal Authentication</li>
 * <li>5041: [ 未认证平台 ]Unidentified Platform</li>
 * <li>5042: [ 不合法跳转URI ]Illegal Redirect URI</li>
 * <li>5043: [ 不合法Code ]Illegal Code</li>
 * <li>5044: [ 不合法状态 ]Illegal State</li>
 * </ul>
 * 
 * @author Kgduyjj
 * @since 1.0.1
 */
@Getter
@ToString
@AllArgsConstructor(access = AccessLevel.PROTECTED)
public enum ResultCode {
    /** 业务执行成功 */
    SUCCESS("0000", "Success"),
    /** 业务执行失败 */
    FAILURE("1111", "Failure"),

    /** 异常错误 */
    ERROR("5000", "Internal Exception"),
    /** 方法未实现 */
    NOT_IMPLEMENTED("5010", "Not Implemented"),
    /** 参数缺失或不完整 */
    PARAMETER_INCOMPLETE("5020", "Parameter Incomplete"),
    /** 非法操作 */
    ILLEGAL_OPERATION("5030", "Illegal Operation"),
    /** 不支持操作 */
    UNSUPPORTED("5031", "Unsupported Operation"),
    /** 非法请求对象 */
    ILLEGAL_REQUEST("5032", "Illegal Request"),
    /** 非法认证 */
    ILLEAGAL_AUTHENTICATION("5040", "Illegal Authentication"),
    /** 未认证平台 */
    UNIDENTIFIED_PLATFORM("5041", "Unidentified Platform"),
    /** 不合法跳转URI */
    ILLEGAL_REDIRECT_URI("5042", "Illegal Redirect URI"),
    /** 不合法CODE */
    ILLEGAL_CODE("5043", "Illegal Code"),
    /** 不合法状态 */
    ILLEGAL_STATUS("5044", "Illegal State"),;

    /** 状态码 */
    protected String code;
    /** 默认消息内容 */
    protected String message;

}
